package alo.p6.work2;

import alo.p6.TreeNode;

/**
 * @ClassName ChildCount
 * @Description 计算结点的孩子结点数
 * @Author Fanxc
 * @DATE 2021/2/3 20:08
 * @Version 1.0
 */
public class ChildCount {
    int childCount(TreeNode current){
        int count=0;
        current=current.getFirstChild();
        while (current!=null){
            count++;
            current=current.getNextSibling();
        }
        return count;
    }
}
